package com.quarantine.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.quarantine.dao.applicationForMembershipDao;
import com.quarantine.model.applicationForMembership;


@Component
@Transactional
public class ApplicationForMembershipManager {

	
	private applicationForMembershipDao applicationDao;

	public applicationForMembershipDao getApplicationDao() {
		return applicationDao;
	}
    @Autowired
	public void setApplicationDao(applicationForMembershipDao applicationDao) {
		this.applicationDao = applicationDao;
	}
    /**
     * 根据id查找
     */
    @Transactional  
	public applicationForMembership getById(String id) {
		return applicationDao.findUniqueBy("id", id);
	}
    @Transactional
    public applicationForMembership getEntity(String check){
    	return applicationDao.findUniqueBy("check1",check);
    }
    @Transactional  
    public void set(applicationForMembership entity){
    	applicationDao.save(entity);
    }
    @Transactional      
    /**
     * 根据id来删除
     */
    public void delete(String id){
    	applicationDao.delete(id);
    }
}
